package clue.editor;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Toolkit;

import javax.swing.JPanel;

public class BoardPanel extends JPanel{
	
	private static final long serialVersionUID = 1L;
	private PlayersPanel playersPanel;
	private EnvelopePanel envelopePanel;
	
	/**
	 * Board panel ctor
	 */
	public BoardPanel()
	{
		setSize(Toolkit.getDefaultToolkit().getScreenSize().width, (Toolkit.getDefaultToolkit().getScreenSize().height));
		playersPanel = new PlayersPanel();
		envelopePanel = new EnvelopePanel();
		playersPanel.setPreferredSize(new Dimension(Toolkit.getDefaultToolkit().getScreenSize().width, (int) (Toolkit.getDefaultToolkit().getScreenSize().height * 0.7)));
		envelopePanel.setPreferredSize(new Dimension(Toolkit.getDefaultToolkit().getScreenSize().width, (int) (Toolkit.getDefaultToolkit().getScreenSize().height * 0.25)));
		setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		add(playersPanel);
		add(envelopePanel);
	}

	public PlayersPanel getPlayersPanel() {
		return playersPanel;
	}

	public EnvelopePanel getEnvelopePanel() {
		return envelopePanel;
	}

	public void setEnvelopePanel(EnvelopePanel envelopePanel) {
		this.envelopePanel = envelopePanel;
	}
}
